﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"
    CodeFile="Photo_Review.aspx.cs" Inherits="Photo_Review" %>
<asp:Content ContentPlaceHolderID="head" runat="server">
    <title>照片回顾</title>
    <style type="text/css">
        .style1
        {
            font-size:12px;
            line-height:20px;
            border:1px solid #2BB3D5;
            width:200px;
            text-align:center;
            padding-top:10px
        }
        .style2
        {
            padding:5px;             
            
        }
        img {
     border: 0;
        }
    </style>
    <script language="javascript" type="text/javascript">

        $(document).ready(function () {
            setupZoom();

        });

        function PopupSubmitDeny() {
            window.showModalDialog("Product_Select.aspx", '', 'width=100,height=100,left=' + (screen.width - 100) / 2 + ',top=' + (screen.height - 100) / 2 + ',center:yes;help:no;resizable:no;status:no;toolbar:no;')
        }
    </script>
   
    <script src="../js/photojs/FancyZoom.js" language="JavaScript" type="text/javascript"></script>
    <script src="../js/photojs/FancyZoomHTML.js" language="JavaScript" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        /*  
        将Date/String类型,解析为String类型.  
        传入String类型,则先解析为Date类型  
        不正确的Date,返回 ''  
        如果时间部分为0,则忽略,只返回日期部分.  
        */
        function formatDate(v) {
            if (v instanceof Date) {
                var y = v.getFullYear();
                var m = v.getMonth() + 1;
                var d = v.getDate();
                var h = v.getHours();
                var i = v.getMinutes();
                var s = v.getSeconds();
                var ms = v.getMilliseconds();
                if (ms > 0)
                    return y + '-' + m + '-' + d + ' ' + h + ':' + i + ':' + s
						+ '.' + ms;
                if (h > 0 || i > 0 || s > 0)
                    return y + '-' + m + '-' + d + ' ' + h + ':' + i + ':' + s;
                return y + '-' + m + '-' + d;
            }
            return '';
        }

        $(function () {
            $('#<%=txtStartDate.ClientID %>').datebox({
                currentText: '今天',
                closeText: '关闭',
                disabled: false,
                required: true,
                missingMessage: '必填',
                formatter: formatDate
            });
        });
        $(function () {
            $('#<%=txtEndDate.ClientID %>').datebox({
                currentText: '今天',
                closeText: '关闭',
                disabled: false,
                required: true,
                missingMessage: '必填',
                formatter: formatDate
            });
        });
    
    
    </script>
    <div>
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle" colspan="6">
                    查询条件
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    部门:
                </td>
                <td nowrap="nowrap" colspan="5">
                    <asp:TextBox ID="txtOrg" runat="server" class="default" onkeydown="alert('请选择部门');return false;"></asp:TextBox>
                    <img alt="查找" onclick="openPopup('../System/PopupOrganization.aspx?NameControlId=<%= txtOrg.UniqueID %>&UserListControlID=<%=txtHidUsers.UniqueID %>&ValueControlId=<%= txtHidOrg.UniqueID %>&SelectType=multi','','300','500');"
                        src="../Resources/Images/search.png" style="cursor: pointer;" />
                    <br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtOrg"
                        ErrorMessage="请选择部门" Display="Dynamic"></asp:RequiredFieldValidator>
                    <input id="txtHidOrg" type="hidden" runat="server" />
                    <input id="txtHidUsers" type="hidden" runat="server" />
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    <span lang="zh-cn">覆盖巡店督导:</span>
                </td>
                <td>
                    <asp:DropDownList ID="ddlMobileUser" runat="server" Width="150">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    照片类型:
                </td>
                <td>
                    <asp:DropDownList ID="ddlPhotoType" runat="server" Width="150">
                        <asp:ListItem Value="">--所有--</asp:ListItem>

                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    客户类型:
                </td>
                <td>
                    <asp:DropDownList ID="ddl_customertype" runat="server" Width="150">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    <span lang="zh-cn">门店名称或代码:</span>
                </td>
                <td>
                    <asp:TextBox ID="txtCustomer" runat="server" Width="150" class="default">
                    </asp:TextBox>
                </td>
                <td class="tablefield">
                    <span lang="zh-cn">开始日期:</span>
                </td>
                <td>
                    <asp:TextBox ID="txtStartDate" runat="server" class="default" Width="150"></asp:TextBox>
                </td>
                <td class="tablefield">
                    <span lang="zh-cn">结束日期:</span>
                </td>
                <td>
                    <asp:TextBox ID="txtEndDate" runat="server" Width="150" class="default"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="buttonarea" colspan="6">
                   <asp:Button ID="btnExport" runat="server" class="wsd_button2" Text="导出图片" 
                        onclick="btnExport_Click"/>
                     &nbsp;&nbsp;
                    <asp:Button ID="btnQuery" runat="server" class="wsd_button2" Text="查  询" OnClick="btnQuery_Click" />
                    &nbsp;&nbsp;
                    <input type="button" class="wsd_button2" size="47" value="重  置" name="reset" onclick="clearForm('form1')" />
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle">
                    回顾照片
                </td>
            </tr>
        </table>
            <table id="wsd_listtable" width="100%">
                <tr>
                    <td style="width: 100%">
                       
                         <div style="overflow:auto">
                            <asp:DataList runat="server" RepeatColumns="5" EmptyDataText="没有可显示的数据." RepeatDirection="Horizontal"
                                RepeatLayout="Table"  Width="99%" ID="dlPhotos" OnItemDataBound="Unnamed1_ItemDataBound" ItemStyle-CssClass="style2">
                                <ItemTemplate>
                                    <div  class="style1" >
                                        <a href='<%#"../IMAGE.ASPX?"+Eval("ID")%>' style="text-decoration: none"><span
                                            style="vertical-align: middle;text-align:center;"  >
                                            <img style="width: 100; height: 100" src='<%#"../IMAGE.ASPX?"+Eval("ID")%>'
                                                alt='<%# Eval("NAME")%>' />
                                        </span></a>
                                        <br />
                                        <div style="text-align:left;padding:10px">
                                        <b><%# Eval("NAME")%></b><br />
                                        拜访时间:<%# Jumpton.SFA.Server.BusinessRule.BusinessLogic.GetDateTime(Eval("START_TIME").ToString(), "yyyyMMddHHmmss", "yyyy-MM-dd HH:mm:ss")%><br />照片类型:<%# getPhotoType(Eval("PHOTO_TYPE_ID").ToString())%></div>
                                   
       
                                    </div>
                                </ItemTemplate>
                            </asp:DataList>
                            </div>
             
                     

                         <table width="100%" class="pagination" cellpadding="0px" cellspacing="0px" border="0">
                            <tr>
                                <td style="height: 32px">
                                    <div class="wsd_pageleft">
                                        <asp:Button CssClass="wsd_pagebutton" ID="btnFirst" runat="server" CausesValidation="false"
                                            OnClick="btn_first_Click" Text="<%$resources:language,lbl_First_Page %>" />
                                        <asp:Button CssClass="wsd_pagebutton" ID="btnPrevious" runat="server" CausesValidation="false"
                                            OnClick="btn_per_Click" Text="<%$resources:language,lbl_PreviousPage %>" />
                                        <asp:Button CssClass="wsd_pagebutton" ID="btnNext" runat="server" CausesValidation="false"
                                            OnClick="btn_next_Click" Text="<%$resources:language,lbl_NextPage %>" />
                                        <asp:Button CssClass="wsd_pagebutton" ID="btnLast" runat="server" CausesValidation="false"
                                            OnClick="btn_end_Click" Text="<%$resources:language,lbl_Last_Page %>" />
                                    </div>
                                    <div class="wsd_pageright">
                                        <asp:Label runat="server" ID="txtInfo"> </asp:Label>
                                        第<asp:TextBox CssClass="wsd_pageinput" ID="txtPage" runat="server" Width="40px"></asp:TextBox>
                                        页
                                        <asp:Button CssClass="wsd_pagegobutton" ID="btnGoto" runat="server" Text="Go" OnClick="btnGoto_Click" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>

    </div>
</asp:Content>
